package com.zz.ecommerce.common.bean.qdc.db;

import com.zz.bundles.cache.dict.DictTag;
import com.zz.ecommerce.common.constants.DictConstants;
import com.zz.ecommerce.utils.SqlType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 申报青岛海关运单信息保存表
 */
public class TWaybillHeadQdc implements Serializable {

    private static final long serialVersionUID = 320771565687285586L;

    private String id;

    /**
     * 运单号
     */
    private String waybillId;

    /**
     * 运输方式邮运[6]
     * 快件[9]
     * 空运[5]
     * 水运[2]
     */
    private String trafMode;

    /**
     * 申报口岸
     */
    private String declPort;

    /**
     * 进出口口岸
     */
    private String iePort;

    /**
     * 运输工具名称
     */
    private String trafName;

    /**
     * 航次 水运航次，其它航班号
     */
    private String voyageNo;

    /**
     * 提运单号  空运主运单
     * 邮运路单
     * 水运提单
     */
    private String billNo;

    /**
     * 集装箱号 物流公司集装袋编号
     */
    private String packId;

    /**
     * 物流企业代码 组织机构代码
     */
    private String logiEnteCode;

    /**
     * 物流企业名称
     */
    private String logiEnteName;

    /**
     * 总运保费 进口必填/出口选填
     */
    private BigDecimal totalFreight;

    /**
     * 币制
     */
    private String currCode;

    /**
     * 重量
     */
    private BigDecimal grossWeight;

    /**
     * 总件数
     */
    private Integer packNum;

    /**
     * 收货人名称 进口必填/出口选填
     */
    private String consigneeName;

    /**
     * 收货人地址 进口必填/出口选填
     */
    private String consigneeAddr;

    /**
     * 收货人电话 进口必填/出口选填
     */
    private String consigneeTel;

    /**
     * 收货人国家 进口必填/出口选填
     */
    private Integer consigneeCoun;

    /**
     * 发货人名称 进口必填/出口选填
     */
    private String consignerName;

    /**
     * 发货人地址 进口必填/出口选填
     */
    private String consignerAddr;

    /**
     * 发货人国家 进口必填/出口选填
     */
    private String consignerCoun;

    private String note;

    @SqlType(type = "date", format = "yyyy-MM-dd hh:mi:ss")
    private String createTime;

    @SqlType(isEquals = true)
    private String status;

    @SqlType(type = "date", format = "yyyy-MM-dd hh:mi:ss")
    private String statusTime;

    private String operId;

    private String orgId;

    /**
     * 电商平台代码
     */
    private String ebPlatId;

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 是否已生成清单
     */
    private String ifCreate;
    /**
     * 贸易模式
     */
    private String tradeMode;

    public String getTradeMode() {
        return tradeMode;
    }

    public void setTradeMode(String tradeMode) {
        this.tradeMode = tradeMode;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return 运单号
     */
    public String getWaybillId() {
        return waybillId;
    }

    /**
     * @param waybillId 运单号
     */
    public void setWaybillId(String waybillId) {
        this.waybillId = waybillId;
    }

    /**
     * @return 运输方式邮运[6]
     * 快件[9]
     * 空运[5]
     * 水运[2]
     */
    public String getTrafMode() {
        return trafMode;
    }

    /**
     * @param trafMode 运输方式邮运[6]
     *                 快件[9]
     *                 空运[5]
     *                 水运[2]
     */
    public void setTrafMode(String trafMode) {
        this.trafMode = trafMode;
    }

    /**
     * @return 申报口岸
     */
    public String getDeclPort() {
        return declPort;
    }

    public String getDeclPortDisplay() {
        return DictTag.getCargoParamVal(DictConstants.S_CUSTOMS_EPORT, declPort, "CUSTOMS_CODE", "CUSTOMS_NAME");
    }


    /**
     * @param declPort 申报口岸
     */
    public void setDeclPort(String declPort) {
        this.declPort = declPort;
    }

    /**
     * @return 进出口口岸
     */
    public String getIePort() {
        return iePort;
    }

    /**
     * @param iePort 进出口口岸
     */
    public void setIePort(String iePort) {
        this.iePort = iePort;
    }

    public String getIePortDisplay() {
        return DictTag.getCargoParamVal(DictConstants.S_CUSTOMS_EPORT, iePort, "CUSTOMS_CODE", "CUSTOMS_NAME");
    }


    /**
     * @return 运输工具名称
     */
    public String getTrafName() {
        return trafName;
    }

    /**
     * @param trafName 运输工具名称
     */
    public void setTrafName(String trafName) {
        this.trafName = trafName;
    }

    /**
     * @return 航次 水运航次，其它航班号
     */
    public String getVoyageNo() {
        return voyageNo;
    }

    /**
     * @param voyageNo 航次 水运航次，其它航班号
     */
    public void setVoyageNo(String voyageNo) {
        this.voyageNo = voyageNo;
    }

    /**
     * @return 提运单号  空运主运单
     * 邮运路单
     * 水运提单
     */
    public String getBillNo() {
        return billNo;
    }

    /**
     * @param billNo 提运单号  空运主运单
     *               邮运路单
     *               水运提单
     */
    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    /**
     * @return 集装箱号 物流公司集装袋编号
     */
    public String getPackId() {
        return packId;
    }

    /**
     * @param packId 集装箱号 物流公司集装袋编号
     */
    public void setPackId(String packId) {
        this.packId = packId;
    }

    /**
     * @return 物流企业代码 组织机构代码
     */
    public String getLogiEnteCode() {
        return logiEnteCode;
    }

    /**
     * @param logiEnteCode 物流企业代码 组织机构代码
     */
    public void setLogiEnteCode(String logiEnteCode) {
        this.logiEnteCode = logiEnteCode;
    }

    /**
     * @return 物流企业名称
     */
    public String getLogiEnteName() {
        return logiEnteName;
    }

    /**
     * @param logiEnteName 物流企业名称
     */
    public void setLogiEnteName(String logiEnteName) {
        this.logiEnteName = logiEnteName;
    }

    /**
     * @return 总运保费 进口必填/出口选填
     */
    public BigDecimal getTotalFreight() {
        return totalFreight;
    }

    /**
     * @param totalFreight 总运保费 进口必填/出口选填
     */
    public void setTotalFreight(BigDecimal totalFreight) {
        this.totalFreight = totalFreight;
    }

    /**
     * @return 币制
     */
    public String getCurrCode() {
        return currCode;
    }

    /**
     * @param currCode 币制
     */
    public void setCurrCode(String currCode) {
        this.currCode = currCode;
    }

    /**
     * @return 重量
     */
    public BigDecimal getGrossWeight() {
        return grossWeight;
    }

    /**
     * @param grossWeight 重量
     */
    public void setGrossWeight(BigDecimal grossWeight) {
        this.grossWeight = grossWeight;
    }

    /**
     * @return 总件数
     */
    public Integer getPackNum() {
        return packNum;
    }

    /**
     * @param packNum 总件数
     */
    public void setPackNum(Integer packNum) {
        this.packNum = packNum;
    }

    /**
     * @return 收货人名称 进口必填/出口选填
     */
    public String getConsigneeName() {
        return consigneeName;
    }

    /**
     * @param consigneeName 收货人名称 进口必填/出口选填
     */
    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    /**
     * @return 收货人地址 进口必填/出口选填
     */
    public String getConsigneeAddr() {
        return consigneeAddr;
    }

    /**
     * @param consigneeAddr 收货人地址 进口必填/出口选填
     */
    public void setConsigneeAddr(String consigneeAddr) {
        this.consigneeAddr = consigneeAddr;
    }

    /**
     * @return 收货人电话 进口必填/出口选填
     */
    public String getConsigneeTel() {
        return consigneeTel;
    }

    /**
     * @param consigneeTel 收货人电话 进口必填/出口选填
     */
    public void setConsigneeTel(String consigneeTel) {
        this.consigneeTel = consigneeTel;
    }

    /**
     * @return 收货人国家 进口必填/出口选填
     */
    public Integer getConsigneeCoun() {
        return consigneeCoun;
    }

    /**
     * @param consigneeCoun 收货人国家 进口必填/出口选填
     */
    public void setConsigneeCoun(Integer consigneeCoun) {
        this.consigneeCoun = consigneeCoun;
    }

    /**
     * @return 发货人名称 进口必填/出口选填
     */
    public String getConsignerName() {
        return consignerName;
    }

    /**
     * @param consignerName 发货人名称 进口必填/出口选填
     */
    public void setConsignerName(String consignerName) {
        this.consignerName = consignerName;
    }

    /**
     * @return 发货人地址 进口必填/出口选填
     */
    public String getConsignerAddr() {
        return consignerAddr;
    }

    /**
     * @param consignerAddr 发货人地址 进口必填/出口选填
     */
    public void setConsignerAddr(String consignerAddr) {
        this.consignerAddr = consignerAddr;
    }

    /**
     * @return 发货人国家 进口必填/出口选填
     */
    public String getConsignerCoun() {
        return consignerCoun;
    }

    /**
     * @param consignerCoun 发货人国家 进口必填/出口选填
     */
    public void setConsignerCoun(String consignerCoun) {
        this.consignerCoun = consignerCoun;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getStatusDisplay() {
        return DictTag.dictItem(DictConstants.ORDER_STATUS_QDC, status);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatusTime() {
        return statusTime;
    }

    public void setStatusTime(String statusTime) {
        this.statusTime = statusTime;
    }

    public String getOperId() {
        return operId;
    }

    public void setOperId(String operId) {
        this.operId = operId;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    /**
     * @return 电商平台代码
     */
    public String getEbPlatId() {
        return ebPlatId;
    }

    /**
     * @param ebPlatId 电商平台代码
     */
    public void setEbPlatId(String ebPlatId) {
        this.ebPlatId = ebPlatId;
    }

    /**
     * @return 订单号
     */
    public String getOrderId() {
        return orderId;
    }

    /**
     * @param orderId 订单号
     */
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getIfCreate() {
        return ifCreate;
    }

    /**
     * 是否已经生成清单
     *
     * @param ifCreate
     */
    public void setIfCreate(String ifCreate) {
        this.ifCreate = ifCreate;
    }

    public String getCurrCodeDisplay() {
        return DictTag.getCargoParamVal(DictConstants.S_CURRENCY_E, currCode, "CODE_C", "NAME_C");
    }

    public String getConsigneeCounDisplay() {
        return DictTag.getCargoParamVal(DictConstants.S_TRADE_COUNTRY_E, String.valueOf(consigneeCoun), "CODE_C", "NAME_C");
    }

    public String getConsignerCounDisplay() {
        return DictTag.getCargoParamVal(DictConstants.S_TRADE_COUNTRY_E, consignerCoun, "CODE_C", "NAME_C");
    }

    @Override
    public String toString() {
        return "TWaybillHeadQdc{" +
                "id='" + id + '\'' +
                ", waybillId='" + waybillId + '\'' +
                ", trafMode='" + trafMode + '\'' +
                ", declPort=" + declPort +
                ", iePort=" + iePort +
                ", trafName='" + trafName + '\'' +
                ", voyageNo='" + voyageNo + '\'' +
                ", billNo='" + billNo + '\'' +
                ", packId='" + packId + '\'' +
                ", logiEnteCode='" + logiEnteCode + '\'' +
                ", logiEnteName='" + logiEnteName + '\'' +
                ", totalFreight=" + totalFreight +
                ", currCode=" + currCode +
                ", grossWeight=" + grossWeight +
                ", packNum=" + packNum +
                ", consigneeName='" + consigneeName + '\'' +
                ", consigneeAddr='" + consigneeAddr + '\'' +
                ", consigneeTel='" + consigneeTel + '\'' +
                ", consigneeCoun=" + consigneeCoun +
                ", consignerName='" + consignerName + '\'' +
                ", consignerAddr='" + consignerAddr + '\'' +
                ", consignerCoun=" + consignerCoun +
                ", note='" + note + '\'' +
                ", createTime=" + createTime +
                ", status='" + status + '\'' +
                ", statusTime=" + statusTime +
                ", operId='" + operId + '\'' +
                ", orgId='" + orgId + '\'' +
                ", ebPlatId='" + ebPlatId + '\'' +
                ", orderId='" + orderId + '\'' +
                '}';
    }
}
